package org.mall.modules.pojo.product.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import org.mall.common.util.jsonschema.Long2StringSerializer;
import org.mall.common.util.jsonschema.String2LongDeserialize;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;

@Data
public class CommoditySpuUpdateDTO implements Serializable {
    private String categoryId;
    private String categoryName;
    /**条目（方便商户管理商品）*/
    private String entryId;
    /**条目名称（方便商户管理商品）*/
    private String entryName;
    /**分类编号*/
    private Integer cid;

    @JsonDeserialize(using = String2LongDeserialize.class)
    @JsonSerialize(using = Long2StringSerializer.class)
    private Long defaultItemId;

    private String description;
    /**SPU 编号*/
    @JsonDeserialize(using = String2LongDeserialize.class)
    @JsonSerialize(using = Long2StringSerializer.class)
    private Long id;

    /**SPU 名字*/
    private String name;
    /**商品主图地址
     *
     * 数组，以逗号分隔
     *
     * 建议尺寸：800*800像素，你可以拖拽图片调整顺序，最多上传15张1*/
    private String picUrls;
    /**原价*/
    private Integer price;

    /**现价*/
    private Integer presentPrice;

    /**库存数量*/
    private Integer quantity;
    /**卖点*/
    private String sellPoint;
    /**店铺_id*/
    private String shopId;
    /**排序字段*/
    private Integer sort;
    private List<CommoditySkuAddDTO> productSkuList;
}
